
//list of jar files

import java.util.concurrent.TimeUnit;

//import org.junit.*;
import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.*;
import org.openqa.selenium.firefox.FirefoxDriver;

//Main Java class. EVerything will be inside this.
public class Test1 {
  private WebDriver driver;
  private String baseUrl;
  private boolean acceptNextAlert = true;
  private StringBuffer verificationErrors = new StringBuffer();

  @Before
  public void setUp() throws Exception {
    driver = new FirefoxDriver();
    baseUrl = "https://qa.silverbackmdm.com/";
    driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
  }

  @Test
  public void testUntitled2() throws Exception {
    driver.get(baseUrl + "/admin/SystemUser/Login?ReturnUrl=%2fadmin");
    driver.findElement(By.id("Username")).clear();
    driver.findElement(By.id("Username")).sendKeys("priyap");
    driver.findElement(By.id("Password")).clear();
    driver.findElement(By.id("Password")).sendKeys("S1lverb@ck");
    driver.findElement(By.cssSelector("input[type=\"submit\"]")).click();
    driver.findElement(By.linkText("Admin")).click();
    driver.findElement(By.linkText("Hardware Authentication")).click();
  }

  @After
  public void tearDown() throws Exception {
    driver.quit();
    String verificationErrorString = verificationErrors.toString();
    if (!"".equals(verificationErrorString)) {
      fail(verificationErrorString);
    }
  }

 
}
